import request from '@/utils/request'

// 查询状态记录列表
export function listRecord(query) {
  return request({
    url: '/prodplan/record/list',
    method: 'get',
    params: query
  })
}

// 查询状态记录详细
export function getRecord(statusId) {
  return request({
    url: '/prodplan/record/' + statusId,
    method: 'get'
  })
}

// 新增状态记录
export function addRecord(data) {
  return request({
    url: '/prodplan/record',
    method: 'post',
    data: data
  })
}

// 修改状态记录
export function updateRecord(data) {
  return request({
    url: '/prodplan/record',
    method: 'put',
    data: data
  })
}

// 删除状态记录
export function delRecord(statusId) {
  return request({
    url: '/prodplan/record/' + statusId,
    method: 'delete'
  })
}

// 导出状态记录
export function exportRecord(query) {
  return request({
    url: '/prodplan/record/export',
    method: 'get',
    params: query
  })
}

// 状态记录审核
export function audit(data) {
  return request({
    url: '/prodplan/record/audit/',
    method: 'post',
    data: data
  })
}

// 挂起
export function hangup(data) {
  return request({
    url: '/prodplan/record/hangup',
    method: 'post',
    data: data
  })
}

// 反挂起
export function hangdown(data) {
  return request({
    url: '/prodplan/record/hangdown',
    method: 'post',
    data: data
  })
}

// 结案
export function close(data) {
  return request({
    url: '/prodplan/record/close',
    method: 'post',
    data: data
  })
}
// 反结案
export function unclose(data) {
  return request({
    url: '/prodplan/record/unclose',
    method: 'post',
    data: data
  })
}